<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('AdminDocument/category')}">分类管理</a></li>
        <li><a href="{:url('AdminDocument/category_add')}">添加分类</a></li>
    </ul>
    <!--<form class="well form-inline margin-top-20" method="post" action="{:url('AdminCategory/index')}">-->
        <!--分类名称:-->
        <!--<input type="text" class="form-control" name="keyword" style="width: 200px;"-->
               <!--value="{$keyword|default=''}" placeholder="请输入分类名称">-->
        <!--<input type="submit" class="btn btn-primary" value="搜索"/>-->
        <!--<a class="btn btn-danger" href="{:url('AdminCategory/index')}">清空</a>-->
    <!--</form>-->

    <form method="post" class="js-ajax-form" action="{:url('AdminCategory/listOrder')}">

            <table class="table table-hover table-bordered table-list">
                <thead>
                <tr>
                    <th width="50">ID</th>
                    <th>分类名称</th>
                    <th>描述</th>
                    <th width="200">操作</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="categories" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td><a href="{:url('portal/Document/index', ['cate_id' => $vo['id']])}" >{$vo.category}</a>
                        </td>
                        <td>{$vo.desc}</td>
                        <td>
                            <a class="btn btn-xs btn-primary"  href="{:url('AdminDocument/category_edit',['id'=>$vo.id])}">编辑</a>
                            <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('AdminDocument/cate_del',['cate_id'=>$vo.id])}">删除</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $(document).ready(function () {
        Wind.css('treeTable');
        Wind.use('treeTable', function () {
            $("#menus-table").treeTable({
                indent: 20,
                initialState: 'expanded'
            });
        });
    });

</script>
</body>
</html>